<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>原生Ajax</title>
        <script src="js/jquery-3.6.0.min.js"></script>
</head>
<body>

<input type="button" value="获取数据" onclick="getData()">

<div id="div1"></div>

</body>
<script>
    function getData(){
        $.ajax({
            type : "get",
            url : "http://localhost:8080/recruitInfo",
            dataType : "json",
            success : function(data){
                if (data != null){
                    //将用户信息显示在页面中
                    document.getElementById('div1').innerHTML = data[0];
                    console.log(data)
                    // document.getElementById('div1').innerHTML = data[0].account;
                }
            }
        });
    }
</script>
</html>